import axios from "../axios.js";
import { FUND } from "../consts.js"
export default {
     // 获取所有基金
    getAllfund(params) {
        return axios({
            url: FUND + '/selectall',
            method: 'GET',
            params
        })
    },
    // 获取已删除的基金
    getAlldeletefund(params){
        return axios({
            url: FUND + '/selectdelete',
            method: 'GET',
            params
        })
    },
    //获取一个基金
    getOnefund(params){
        return axios({
            url: FUND + '/selectById',
            method: 'GET',
            params
        })
    },
    // 修改基金

    editorfund(data){
        return axios({
            url: FUND + '/updateone',
            method: 'PUT',
            data
        })
    },
    //获取风险等级和投资策略
    getrisk(data){
        return axios({
            url:"/riskGrade/info",
            method:"POST",
            data
        })
    },
    //查找基金
    select(params){
        return axios({
            url:FUND + '/selectkey',
            method:"GET",
            params
        })
    },
    //加入回收站
    joinback(data){
        return axios({
            url:FUND + '/delete',
            method:"POST",
            data
        })
    },
    // 恢复基金
    recover(params){
        return axios({
            url:FUND+'/recoverfund',
            method:"GET",
            params
        })
    },
    // 彻底删除
    delete(data){
        return axios({
            url:FUND+'/deleteDel',
            method:'POST',
            data
        })
    },
    //搜索已下架基金
    selectkeydel(params){
        return axios({
            url:FUND+"/selectkeydel",
            method:"GET",
            params
        })
    },
    //添加一个基金
    addone(data){
        return axios({
            url:FUND+"/addone",
            method:"POST",
            data
        })
    }
   
}